<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>v-html指令</title>
    <!--引入Vue库-->
    <script src="vue.js"></script>
  </head>
  <body>
    <div id="app">
      <div v-html="info"></div>
      <div v-html="bookName"></div>
      <div v-html="publisher"></div>
      <div v-html="price"></div>
      <div v-html="number"></div>
      <div v-html="amount"></div>
    </div>
    <script>
      var vm = new Vue({
        el: "#app",
        data: {
          info: "<h3>图书详情</h3>",
          bookName: "<span>图书名称：HTML5+CSS3移动Web开发实战</span>",
          publisher: "<span>出&nbsp;版&nbsp;社：人民邮电出版社</span>",
          price: "<span>价&nbsp;&nbsp;格：￥58</span>",
          number: "<span>数&nbsp;&nbsp;量：2</span>",
          amount: "<span>金&nbsp;&nbsp;额：116元</span>",
        },
      });
    </script>
  </body>
</html>
